package com.ff.device.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

public class CmdUtils {

    private static final Logger logger = LoggerFactory
            .getLogger(CmdUtils.class);

    public static BufferedReader exeCmd(String command){

        Runtime runtime = Runtime.getRuntime();
        BufferedReader	bufferedReader=null;
        try {
            Process process = runtime.exec(command);
            bufferedReader = new BufferedReader
                    (new InputStreamReader(process.getInputStream()));
            return bufferedReader;
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }

}
